.t-layout__sider,
.t-layout__sider .t-default-menu {
  @include themeify {
    background-color: themed('sidebar_bg');
  }
  &__inner .t-menu__logo:not(:empty) {
    @include themeify {
      background-color: themed('sidebar_bg');
    }
  }
}

.t-tabs__nav-item,
.t-breadcrumb__item,
.t-breadcrumb,
.t-dropdown,
.t-radio-group .t-radio-button {
  @include font_color('font_color');
}

.t-default-menu .t-menu__item.t-is-active:not(.t-is-opened) {
  background-color: var(--color-primary);
  color: var(--iconfont-selected);

  .t-icon {
    color: var(--iconfont-selected);
  }
}

.t-default-menu .t-menu__item.t-is-opened,
.t-default-menu .t-menu__item,
.t-default-menu .t-menu__item.t-is-opened .t-icon {
  color: var(--iconfont-default);
}

.t-default-menu .t-menu__item:hover:not(.t-is-active):not(.t-is-disabled) {
  background: rgba(0, 0, 0, 0.09);
}
.t-breadcrumb {
  &__inner-text {
    &:hover {
      color: var(--color-primary);
    }
  }
}
//复选框
.t-checkbox {
  @include font_color('font_color');
  &.checkbox-button {
    padding: 4px 8px;
    border-radius: 3px;

    @include themeify {
      background-color: themed('split_color');
      border: 1px solid themed('split_color');
    }

    &.t-is-checked {
      .t-checkbox__input {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
      }
    }
  }
  &.t-is-checked {
    .t-checkbox__input {
      background-color: var(--color-primary);
      border-color: var(--color-primary);
    }
  }
  &.t-is-indeterminate .t-checkbox__input {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
  }
  &__input {
    @include background_color('page_bg_color');
    @include border_color('border_color');
  }
  &:hover {
    .t-checkbox__input {
      border-color: var(--color-primary);
    }
  }
}

//单选框
.t-radio {
  &__label {
    @include font_color('font_color');
  }

  &.radio-button {
    padding: 4px 8px;
    border-radius: 3px;

    @include themeify {
      background-color: themed('split_color');
      border: 1px solid themed('split_color');
    }

    &.t-is-checked {
      border-color: var(--color-primary);

      @include themeify {
        @include background_color('page_bg_color');
        @include border_color('border_color');
      }
    }
  }

  &-group {
    &.t-radio-group--filled {
      @include themeify {
        background-color: themed('background_color');
        border: 1px solid themed('border_color');
      }

      .t-radio-button.t-is-checked {
        border-color: var(--color-primary);

        @include themeify {
          background-color: themed('primary_color_light');
          color: themed('primary_color');
        }
      }
    }

    .t-radio-button.t-is-checked {
      border-color: var(--color-primary);
    }
  }

  &__input {
    @include background_color('page_bg_color');

    &::after {
      background-color: var(--color-primary);
    }
  }

  &.t-is-checked,
  &:hover {
    .t-radio__input {
      border-color: var(--color-primary);
    }
  }
}

//输入框
.t-input {
  @include border_color('border_color');
  @include background_color('page_bg_color');

  &:focus,
  &--focused {
    @include themeify {
      box-shadow: 0 0 0 1px themed('shadow_color');
    }
  }

  &.t-is-disabled {
    @include background_color('split_color');
    @include font_color('disabled_color');
    .t-input__inner {
      @include font_color('disabled_color');
    }
  }

  &__inner {
    @include font_color('font_color');

    &::-webkit-input-placeholder {
      @include font_color('placeholder_color');
    }

    &::-moz-placeholder {
      @include font_color('placeholder_color');
    }

    &:-ms-input-placeholder {
      @include font_color('placeholder_color');
    }

    &::-ms-input-placeholder {
      @include font_color('placeholder_color');
    }

    &::placeholder {
      @include font_color('placeholder_color');
    }
  }

  &__clear {
    .t-icon {
      @include font_color('placeholder_color');
    }
  }
  .t-input__suffix {
    > .t-icon {
      @include font_color('font_color');
    }
  }
}
.t-textarea {
  &__inner {
    @include border_color('border_color');
    @include background_color('page_bg_color');
  }
}
// 日期选择器
.t-date-picker,
.t-date-range-picker {
  &__cell {
    &:hover {
      .t-date-picker__cell-inner {
        box-shadow: inset 0 0 0 1px var(--color-primary);
      }
    }
    &--active {
      .t-date-picker__cell-inner {
        background-color: var(--color-primary);
      }
    }
    &--additional {
      .t-date-picker__cell-inner {
        @include font_color('disabled_color');
      }
      &:hover {
        .t-date-picker__cell-inner {
          background-color: transparent;
          border-color: var(--color-primary);
        }
      }
    }
    &.t-date-picker__cell--hover-highlight::after {
      @include background_color('disabled_color');
      opacity: 0.5;
    }
  }
  &__panel {
    .t-button + .t-button {
      margin-left: 0;
    }
    .t-date-picker__cell--highlight::before {
      // @include background_color("disabled_color");
      background-color: var(--color-primary);
      opacity: 0.1;
    }
  }
  &__table table th {
    @include font_color('font_color');
  }
  .t-range-input {
    @include background_color('page_bg_color');
    @include border_color('border_color');
    &:focus,
    &:hover,
    &--focused {
      @include themeify {
        box-shadow: 0 0 0 1px themed('shadow_color');
        border-color: themed('shadow_color');
      }
    }
    &-popup--visible {
      .t-range-input {
        box-shadow: 0 0 0 2px themed('shadow_color');
        .t-input.t-is-focused {
          @include background_color('disabled_color');
          opacity: 0.3;
        }
        .t-icon-calendar {
          color: var(--color-primary);
        }
      }
    }
    &__inner .t-input:hover {
      @include background_color('disabled_color');
      opacity: 0.3;
    }
    &__suffix > .t-icon {
      @include font_color('font_color');
    }
  }
}

//按钮
.t-button {
  &--variant-base {
    &.t-button--theme-primary:hover {
      background-color: var(--color-primary);
      border-color: var(--color-primary);
    }
  }
  &--theme-default {
    @include themeify {
      background-color: themed('page_bg_color');
      border-color: themed('border_color');
      color: themed('font_color');
    }
  }

  &--theme-primary {
    @include themeify {
      background-color: var(--color-primary);
      border-color: var(--color-primary);
    }
  }

  &--variant-text {
    @include themeify {
      background-color: transparent;
      border-color: transparent;
    }

    .t-icon {
      & + .t-button__text:not(:empty) {
        margin-left: 0;
      }
    }

    &.t-button--theme-primary {
      color: var(--color-primary);
      &:hover {
        color: var(--iconfont-selected);
        .t-icon {
          color: var(--iconfont-selected);
        }
      }
      .t-icon {
        color: var(--color-primary);
      }
    }
  }

  &--variant-outline {
    @include background-color('page_bg_color');

    &.t-button--theme-primary {
      @include themeify {
        border-color: var(--color-primary);
        color: var(--color-primary);
      }
    }
  }

  &.t-size-l {
    padding-left: 15px;
    padding-right: 15px;
  }

  & + .t-button {
    margin-left: 10px;
  }
}

//标签
.t-tag {
  &--default {
    @include themeify {
      color: themed('disabled_color');
      background-color: themed('split_color');
      border-color: themed('border_color');
    }
  }

  &--danger {
    @include background_color('error_color');

    &.t-tag--light {
      @include themeify {
        color: #fff;
        background-color: themed('error_color_light');
      }
    }
  }

  &--success {
    @include background_color('success_color');

    &.t-tag--light {
      @include themeify {
        color: #fff;
        background-color: themed('success_color_light');
      }
    }
  }

  &--warning {
    @include background_color('warning_color');

    &.t-tag--light {
      @include themeify {
        color: themed('warning_color');
        background-color: themed('warning_color_light');
      }
    }
  }
}

//select & cascader
.t-select {
  .t-input__suffix-icon {
    position: relative;
    right: 0 !important;

    .t-fake-arrow {
      @include font_color('font_color');
    }

    &::before {
      content: '';
      position: absolute;
      @include background_color('split_color');
      width: 32px;
      height: 32px;
      left: -8px;
      z-index: -1;
    }
  }

  .t-size-l {
    .t-input__suffix-icon::before {
      width: 40px;
      height: 40px;
      left: -12px;
      top: -12px;
    }
  }

  &-option {
    height: 32px;
    padding: 0 8px;

    & + .t-select-option {
      margin-top: 4px;
    }

    &.t-is-selected {
      @include themeify {
        background-color: var(--color-primary);
        color: var(--iconfont-selected);
      }

      .t-checkbox__label {
        @include font_color('font_color');
      }
    }

    &.t-select-option__hover {
      &:not(.t-is-disabled):not(.t-is-selected) {
        @include background_color('split_color');
      }
    }

    &-group__header {
      @include font_color('placeholder_color');
    }
  }

  &__dropdown-inner {
    .t-select__list {
      padding: 8px;
    }
  }

  .t-tag-input {
    .t-tag {
      padding-right: 4px;
      @include font_color('font_color');
    }
  }

  &-input {
    .t-input__suffix-icon {
      position: relative;
      right: 0 !important;

      &::before {
        content: '';
        position: absolute;
        @include background_color('split_color');
        width: 32px;
        height: 32px;
        left: -8px;
        z-index: -1;
      }
    }
  }
}

//树
.t-tree {
  font-size: 14px;
  font-weight: 400;
  @include font_color('font_color');

  &__item {
    padding: 0 8px;
    border-radius: 3px;

    & + .t-tree__item {
      margin-top: 5px;
    }

    &::before {
      height: 36px;
    }

    &:hover {
      @include background_color('second_container_color');
    }

    .t-tree__icon {
      @include font_color('font_color');

      &:hover {
        background-color: transparent;
      }
    }

    .t-tree__label {
      flex: 1;
      margin-left: 0;
      padding: 0;

      > span {
        display: block;
      }

      &:hover {
        background-color: transparent !important;
      }

      .label {
        margin-right: 10px;
      }
    }

    &.t-is-active {
      @include themeify {
        background-color: var(--color-primary);
        color: var(--iconfont-selected);
      }

      .t-tree__label {
        @include themeify {
          background-color: transparent;
          color: var(--iconfont-selected);
        }
      }
    }
  }

  &.hide-icon {
    .t-tree__icon {
      &:empty {
        width: 0;
      }
    }
  }
}

//表格
.t-table {
  @include font_color('font_color');

  tr {
    @include background_color('page_bg_color');
  }

  th {
    @include font_color('placeholder_color');
  }

  &--striped {
    &:not(.t-table--header-fixed) tbody {
      > tr:nth-of-type(odd) {
        &:not(.t-table__expanded-row) {
          @include background_color('split_color');
        }
      }
    }

    &:not(.t-table--bordered) td {
      @include themeify {
        border-bottom: 1px solid themed('border_color');
      }
    }

    &.t-table--hoverable tbody tr:hover {
      @include themeify {
        background-color: themed('split_color') !important;
      }
    }
  }

  &__tree {
    &-op-icon {
      margin-left: 10px;
      @include font_color('placeholder_color');
    }
  }
}

//分页
.t-pagination {
  &__total {
    @include font_color('font_color');
  }

  &__number {
    @include themeify {
      border-color: themed('border_color');
      background-color: themed('page_bg_color');
      color: themed('font_color');
    }
    &.t-is-current {
      background-color: var(--color-primary);
      color: var(--iconfont-selected);
    }
  }
  &__btn {
    @include font_color('font_color');
    &:hover {
      @include background_color('page_bg_color');
    }
  }
  &__jump {
    background-color: transparent;
    @include font_color('font_color');
    .t-input-adornment__append {
      @include font_color('font_color');
    }
  }

  .t-input-number {
    width: 48px;
  }

  .t-select .t-input__suffix-icon::before {
    background-color: transparent;
  }
}

.t-form {
  @include font_color('font_color');
  &__label {
    @include font_color('font_color');

    &--top {
      line-height: 14px;
      min-height: 14px;
      margin-bottom: 10px;
    }

    &--required label {
      &::before {
        line-height: 14px;
      }
    }
  }
}

.t-dialog {
  @include background_color('page_bg_color');
  @include border_color('border_color');
  @include font_color('font_color');
  &--default {
    padding: 0;
  }

  &__header {
    height: 68px;
    padding: 24px;

    @include themeify {
      border-bottom: 1px solid themed('border_color');
    }

    .t-dialog__header-content {
      font-size: 20px;
      line-height: 20px;
      font-weight: 700;
      @include font_color('font_color');
      &::before {
        content: '';
        width: 5px;
        height: 20px;
        background-color: var(--color-primary);
        border-radius: 1px 4px 4px 1px;
        margin-right: 12px;
      }
    }
  }

  &__close {
    font-size: 28px;
    width: 28px;
    height: 28px;
    @include font_color('font_color');
    &:hover {
      @include background_color('background_color');
    }
  }

  &__body {
    padding: 24px;
    @include font_color('font_color');
  }

  &__footer {
    padding: 15px 24px;

    @include themeify {
      border-top: 1px solid themed('border_color');
    }
  }

  &__header--fullscreen {
    .t-dialog__header-content {
      justify-content: flex-start;
    }
  }
}

.t-divider {
  @include themeify {
    border-color: themed('border_color');
  }
}

.t-upload {
  &__tips {
    @include font_color('placeholder_color');
  }
}

.t-drawer {
  &__header {
    @include border_color('border_color');
  }

  &__content-wrapper {
    @include background_color('page_bg_color');
    @include font_color('font_color');
  }

  &__footer {
    @include background_color('page_bg_color');
    @include border_color('border_color');
  }

  &__close-btn {
    @include background_color('page_bg_color');
    @include font_color('font_color');

    .t-icon {
      font-size: 20px;
    }
  }
}

.t-popup {
  @include font_color('font_color');
  &__content {
    @include background_color('page_bg_color');
    @include font_color('font_color');

    .t-select-option {
      @include font_color('font_color');

      &.t-is-selected {
        color: var(--iconfont-selected);
      }

      &.t-select-option__hover {
        &:not(.t-is-disabled):not(.t-is-selected) {
          @include background_color('split_color');
        }
      }
    }
  }
}
.t-menu__popup .t-menu__item {
  @include font_color('font_color');
  &:hover:not(.t-is-active):not(.t-is-opened):not(.t-is-disabled) {
    background: rgba(0, 0, 0, 0.09);
  }
}
.t-dropdown {
  @include border_color('border_color');
  // @include shadow_color("shadow_color");
  &__item {
    @include font_color('font_color');

    &:hover {
      @include background_color('split_color');
    }
    &--theme-default {
      &.t-dropdown__item--suffix:hover {
        color: var(--color-primary);
      }
    }
    &-text {
      &:hover {
        color: var(--color-primary);
      }
    }
  }
  &__submenu {
    @include border_color('border_color');
    @include background_color('page_bg_color');
  }
}
.t-popconfirm {
  &__icon--default {
    color: var(--color-primary);
  }
}
.t-color-picker__swatches-wrap .t-color-picker__swatches--title {
  @include font_color('font_color');
}
// 进度条
.t-progress {
  &__inner {
    background-color: var(--color-primary);
  }
  &--status--error .t-progress__inner {
    @include background_color('error_color');
  }
  &--status--success .t-progress__inner {
    @include background_color('success_color');
  }
  &--status--warning .t-progress__inner {
    @include background_color('warning_color');
  }
  &__info {
    @include font_color('font_color');
  }
}
// .t-alert{
//     @include font_color("font_color");
//     &--success{
//         @include background_color("success_color");
//     }
// }
.t-notification {
  @include background_color('page_bg_color');
  @include border_color('border_color');
  @include font_color('font_color');
  &__content {
    @include font_color('font_color');
  }
  &__title {
    @include font_color('font_color');
  }
  .t-icon {
    &.t-is-success {
      @include font_color('success_color');
    }
    &.t-icon-close {
      @include font_color('font_color');
      &:hover {
        @include background_color('split_color');
      }
    }
  }
}
